home *** CD-ROM | disk | FTP | other *** search
-
- COMMENT \
- Macro to generate a FAR return, regardless of the PROC type.
- \
- RETF MACRO $$COUNT
- IFB <&$$COUNT> ;; Is there a pop count?
- DB 0CBH ;; No, just do the return
- ELSE
- DB 0CAH ;; Define the instruction
- DW &$$COUNT ;; And the pop count
- ENDIF
- ENDM ; RETF
-
- COMMENT \
- Macro to generate a NEAR return, regardless of the PROC type.
- \
- RETN MACRO $$COUNT
- IFB <&$$COUNT> ;; Is there a pop count?
- DB 0C3H ;; No, just do the return
- ELSE ;; Otherwise...
- DB 0C2H ;; Generate the return
- DW &$$COUNT ;; And the pop count
- ENDIF
- ENDM ; RETN
-
- COMMENT \
- Macro to generate exit to DOS, allowing for exit code.
- \
- $EXIT MACRO $$CODE
- IFB <$$CODE>
- MOV AX,4C00H
- ELSE
- MOV AX,(4CH*256)+&$$CODE
- ENDIF
- INT 21H
- ENDM ; $EXIT
-
- SAVE MACRO P1,P2,P3,P4,P5,P6,P7,P8,P9
- IRP Y,<P1,P2,P3,P4,P5,P6,P7,P8,P9>
- IFNB <Y>
- PUSH Y
- ENDIF
- ENDM
- RESTORE MACRO
- IRP Z,<P9,P8,P7,P6,P5,P4,P3,P2,P1>
- IFNB <Z>
- POP Z
- ENDIF
- ENDM
- ENDM
- ENDM
-
-
- SAVE_REG MACRO P1,P2,P3,P4,P5,P6,P7,P8,P9
- IRP Y,<P1,P2,P3,P4,P5,P6,P7,P8,P9>
- IFNB <Y>
- PUSH Y
- ENDIF
- ENDM
- RESTORE MACRO
- IRP Z,<P9,P8,P7,P6,P5,P4,P3,P2,P1>
- IFNB <Z>
- POP Z
- ENDIF
- ENDM
- ENDM
- ENDM
-
-
-